home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: slam.ldgo.columbia.edu!okeefe
- From: okeefe@slam.ldgo.columbia.edu (paul okeefe)
- Subject: filter to add 'extern "C"' to .h files
- Message-ID: <1996Feb16.163806.10605@lamont.ldgo.columbia.edu>
- Sender: news@lamont.ldgo.columbia.edu (USENET News System)
- Organization: Lamont-Doherty Earth Observatory
- Date: Fri, 16 Feb 1996 16:38:06 GMT
-
- Can someone point me to a PERL script to add the C linkage
- specification to a C header file?
-
- Paul O'Keefe
-
- ==================================
-
- BEFORE:
-
- #ifndef _MATH_H
- #define _MATH_H
-
- double sqrt(double);
-
- #endif /* !defined(_MATH_H) */
-
- ==================================
-
- AFTER:
-
- #ifndef _MATH_H
- #define _MATH_H
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- double sqrt(double);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* !defined(_MATH_H) */
-